<div class="condition-container">
    <div class="left-container">
        <p-fileUpload #file mode="basic" name="file" auto="true" [chooseLabel]="revistiLabel" customUpload="true"
            (uploadHandler)="onFileUpload($event, file)"></p-fileUpload>
        <div class="hotline-upload-type" *ngIf="type == 0">
            <p-radioButton name="reVisitType" value="2" label="区级回访" [(ngModel)]="reVisitType"
                (onClick)="reVisitTypeChange()"></p-radioButton>
            &nbsp;&nbsp;&nbsp;
            <p-radioButton name="reVisitType" value="1" label="市级回访" [(ngModel)]="reVisitType"
                (onClick)="reVisitTypeChange()"></p-radioButton>
        </div>
    </div>
    <div class="right-container">
        <span class="label">{{timeRangeLabel}}</span>
        <p-calendar [showIcon]="true" [(ngModel)]="date" [style]="{'margin-left': '20px'}" dateFormat="yy-mm-dd"
            [locale]="zh" [readonlyInput]="true" selectionMode="range" [showTime]="true" rangeSeparator='至'
            [inputStyle]="{'background':'transparent', 'color':'whitesmoke', 'border-color':'#1F3F83', 'width':'300px'}">
        </p-calendar>
    </div>
</div>
<div class="hotline">
    <div class="stat-container">
        <p-table [columns]="cols" [value]="items" selectionMode="single" [scrollable]="true"
            [alwaysShowPaginator]="'fasle'" [scrollHeight]="'calc(100vh - 270px)'" [style]="{width:'100%'}"
            [loading]="loading" [paginator]="true" [rows]="100">
            <ng-template pTemplate="header" let-columns>
                <tr>
                    <th *ngFor="let col of columns" [ngStyle]="col.style">
                        {{col.header}}
                    </th>
                </tr>
            </ng-template>
            <ng-template pTemplate="body" let-rowData let-columns="columns">
                <tr [pSelectableRow]="rowData">
                    <td *ngFor="let col of columns" [ngStyle]="col.style">
                        {{rowData[col.field]}}
                    </td>
                </tr>
            </ng-template>
            <ng-template pTemplate="paginatorleft" let-state>
                第{{state.page + 1}} / {{state.totalRecords / state.rows | mathceil}}页
            </ng-template>

            <ng-template pTemplate="paginatorright" let-state>
                共{{items.length}}条
            </ng-template>
        </p-table>
    </div>
</div>
<div class="button-item">
    <span>{{message}}</span>
    <button pButton type="button" [disabled]="disabled" (click)="importData()" label="导入正确数据" icon="fa fa-upload"
        *ngIf="successList.length > 0"></button>
    <button pButton type="button" [disabled]="disabled" (click)="exportErrorData()" label="导出错误数据" icon="fa fa-download"
        *ngIf="failList.length > 0"></button>
</div>